from django import forms

from tickets.models import Ticket, Note

class TicketsOwnedForm(forms.Form):
	submitter_email = forms.EmailField(
		required=True,
		label='Your Email Address',
		# leave out until you can make it more useful
		#help_text='Enter the email address that submitted the tickets'
	)

class CreateTicketForm(forms.ModelForm):
	class Meta:
		model = Ticket
		fields = ('title', 'submitter_email', 'priority', 'description')
		widgets = {
			'description': forms.Textarea(attrs={'cols': 80, 'rows': 20}),
		}

class UserAddNoteForm(forms.ModelForm):
	class Meta:
		model = Note
		fields = ('submitter_email', 'comment')
		widgets = {
			'comment': forms.Textarea(attrs={'cols': 80, 'rows': 10}),
		}

class WorkerAddNoteForm(forms.ModelForm):
	class Meta:
		model = Note
		fields = ('comment',)
		widgets = {
			'comment': forms.Textarea(attrs={'cols': 80, 'rows': 10}),
		}
